A three-dimensional memory using a magnetic domain wall has been proposed for realizing a large capacity memory. This three-dimensional memory includes a magnetic thin line, a reading part, and a writing part. The three-dimensional memory has a structure enabling adjustment of a position of the magnetic thin line, the reading part, and the writing part.